/**
 * Sistem Informasi Penjualan
 * @author Kelompok 1
 * Ligar Sekar Wangi
 * Tri Maryani
 * Winda Rahadyan
 * TIF/IV/A
 */

import java.sql.*;

public class Connect {
  	public Connect()  {
  	}
  	
	public Connection OpenConnect() throws SQLException  {
        Connection con1 = null;
     	try {
		    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
      	    con1=DriverManager.getConnection("jdbc:odbc:DsnDbInventory","","");
		    return con1;
		}
    	catch (SQLException se) {
      	    System.out.println("Perintah SQL Salah!!!");
      	    return null;
    	}
        catch (Exception ex) {
      	   System.out.println("Driver Tidak Terhubung!!!");
      	   return null;
    	}
  	}
}